<template>
  <div class="app-container">
    <div class="ul_list01">
      <el-row>
        <el-col :span="8" v-for="(points, index) in userShopList" :key="index" >
          <el-card :body-style="{ padding: '0px' }" style="width: 400px;height: 320px;margin-top: 50px">
            <img style="width: 400px;height: 200px"  src="" v-if="points.coverFiles.length < 1"  alt="">
            <img style="width: 400px;height: 200px" :src="points.coverFiles[0].url" v-else  alt="">
            <div style="padding: 14px;">
              <span>{{ points.name }}</span>
              <div class="bottom clearfix">
                <div class="describes" >
                  <span class="data">
                    <el-popover
                      placement="top-start"
                      trigger="hover"
                      width="400"
                      :disabled="points.describes.length < 20"
                      effect="dark"
                      :content="points.describes"
                    >
                    <span slot="reference">
                      {{ points.describes.length > 20 ? points.describes.substring(0, 20) + "..." : points.describes }}
                    </span>
                    </el-popover>
                  </span>
                </div>

              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
      </div>
    <div class="page">
      <pagination
        v-show="total>0"
        :total="total"
        :page-sizes="[6, 12, 24,48]"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </div>
  </div>
</template>

<script>
import {userPointsList,userInfo} from "@/api/resources/common.js";

export default {
  name: "antiFraud",
  data() {
    return {
      // 表单参数
      form: {},
      // 显示搜索条件
      showSearch: true,
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 6,
      },
      userShopList:[],
      userInfo:{}
    };
  },
  created() {
    this.getList()
  },
  methods: {
    /** 查询参数列表 */
    getList() {
      this.loading = true;
      userPointsList().then(res=>{
        this.userShopList = res.rows
      })
      userInfo().then(res=>{
        this.userInfo = res.data
      })
    },
  }
};
</script>
<style>

.ul_list01 {
  margin: -20px 0 0 0px;
  padding: 0 20px;
  border-bottom: #ccc 1px dotted;
  overflow: hidden;
}
@media screen and (min-width: 980px)
.ul_list01 {
  width: 978px;
}

.data{
  margin-top: 6px;
  font-size: 13px;
  display: inline-block;
  color: #999;
}
.page {
  padding: 10px;
  text-align: right;
  font-size: 12px;
  overflow: hidden;
}
.ul_list01 li {
  float: left;
  font-size: 14px;
  text-align: center;
}
@media screen and (min-width: 980px)
.ul_list01 li {
  width: 302px;
  padding: 10px 12px;
}
.ul_list01 li h4 {
  width: 100%;
  height: 20px;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
  -moz-text-overflow: ellipsis;
  overflow: hidden;
}
@media screen and (min-width: 980px)
.ul_list01 img {
  width: 300px;
  height: 118px;
}
</style>
